package seg.tef4.whms.domain;

import java.util.Date;

import seg.tef4.whms.domain.entity.SysUser;

/**
 * 【请填写功能名称】对象 t_out_warehouse
 *
 * @author ruoyi
 * @date 2023-06-29
 */
public class TOutWarehouse extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    private Long id;

    /**
     * 物料号
     */
    private String materialNo;

    /**
     * 产线
     */
    private String line;

    /**
     * 工位
     */
    private String station;

    /**
     * 出库类型
     */
    private String outType;

    /**
     * 出库数量
     */
    private Long outNum;

    private String createBy;
    /**
     * 创建时间
     */
    private Date createTime;

    public String getCreateTimeStr() {
        return createTimeStr;
    }

    public void setCreateTimeStr(String createTimeStr) {
        this.createTimeStr = createTimeStr;
    }

    private String createTimeStr;
    /**
     * 是否删除  0正常  2删除
     */
    private String delFlag;

    /**
     * 状态 0 出库 1:已退库
     */
    private Integer status;

    private String statusStr;

    private TSparePart tSparePart;

    private SysUser sysUser;

    public SysUser getSysUser() {
        return sysUser;
    }

    public void setSysUser(SysUser sysUser) {
        this.sysUser = sysUser;
    }

    public void setStatusStr(String statusStr) {
        this.statusStr = statusStr;
    }

    public TSparePart gettSparePart() {
        return tSparePart;
    }

    public void settSparePart(TSparePart tSparePart) {
        this.tSparePart = tSparePart;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setMaterialNo(String materialNo) {
        this.materialNo = materialNo;
    }

    public String getMaterialNo() {
        return materialNo;
    }

    public void setLine(String line) {
        this.line = line;
    }

    public String getLine() {
        return line;
    }

    public void setStation(String station) {
        this.station = station;
    }

    public String getStation() {
        return station;
    }

    public void setOutType(String outType) {
        this.outType = outType;
    }

    public String getOutType() {
        return outType;
    }

    public void setOutNum(Long outNum) {
        this.outNum = outNum;
    }

    public Long getOutNum() {
        return outNum;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getDelFlag() {
        return delFlag;
    }

    @Override
    public String getCreateBy() {
        return createBy;
    }

    @Override
    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
        if(status == 0)
            this.statusStr = "出库";
        else if(status ==1)
            this.statusStr = "待一级审批";
        else if(status ==2)
            this.statusStr = "待二级审批";
        else if(status ==3)
            this.statusStr = "已退库";
    }

    public String getStatusStr(){
        return this.statusStr;
    }

    @Override
    public String toString() {
        return new StringBuilder()
                .append(getId()).append("\n")
                .append(getMaterialNo()).append("\n")
                .append(getLine()).append("\n")
                .append(getStation()).append("\n")
                .append(getOutType()).append("\n")
                .append(getOutNum()).append("\n")
                .append(getDelFlag()).append("\n")
                .append(getCreateBy()).append("\n")
                .append(getCreateTimeStr()).append("\n")
                .append(getUpdateBy()).append("\n")
                .append(getUpdateTime()).append("\n")
                .append(getRemark()).append("\n")
                .append(getStatus()).append("\n")
                .toString();
    }
}
